<layout name="master"/>
<div class="btn-group" style="margin: 20px 0px">
    <a href="{:U('add')}" class="btn btn-success">添加顶级分类</a>
</div>
<table class="table table-hover">
    <thead>
    <tr>
        <th>编号</th>
        <th>分类名称</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <foreach name="category" item="vo">
        <tr>
            <td>{$vo['cid']}</td>
            <td>{$vo['_cname']}</td>
            <td>
                <div class="btn-group">
                    <a href="{:U('edit',['cid'=>$vo['cid']])}" class="btn btn-info">编辑</a>
                    <a href="{:U('add',['cid'=>$vo['cid']])}" class="btn btn-primary">添加子类</a>
                    <a href="{:U('del',['cid'=>$vo['cid']])}" class="btn btn-danger">删除</a>
                </div>
            </td>
        </tr>
    </foreach>
    </tbody>
</table>